package xyj.sparrow.scheduler.common;

import lombok.Data;
import xyj.sparrow.scheduler.entity.Account;

/**
 * @author 江南小俊
 * @since 2021/6/11 下午10:20
 **/
@Data
public class Token {
    private String role = Role.User;
    private Account account;

    public Token(Account account) {
        this.account = account;
        this.role = account.getAccountType() == 1 ? Role.Admin : Role.User;
    }

    static final class Role {
        static String Admin = "管理员";
        static String User = "用户";
    }

}
